import 'package:flutter/material.dart';

class HeroImageDetailPage extends StatelessWidget {
  final String imageUrl;

  HeroImageDetailPage(this.imageUrl);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: GestureDetector(
        child: Container(
          width: double.infinity,
          height: double.infinity,
          color: Colors.orangeAccent,
          child: Center(
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: <Widget>[
                Text(imageUrl,style: TextStyle(fontSize: 50,color: Colors.white),),
                Hero(
                  child: Image.network(imageUrl),
                  tag: imageUrl,
                ),
              ],
            )
          ),
        ),
        onTap: () {
          Navigator.of(context).pop();
        },
      ),
    );
  }
}
